<style lang="scss">
  @import 'index';
</style>

<template>
  <div class="ga-container">
    <div class="ga-product-new">
      <!--tab-->
      <div class="weui-tab ga-tab">
        <div class="weui-tab__panel">
          <!--0-->
          <div class="weui-tab__content">

            <ul class="ga-group-list ga-media-list">
              <li v-for="(item,index) in list" :key="index">
                <a class="item" :href="'../shopDetail/main?id='+item.id">
                  <div class="item-media">
                    <image class="img-box" mode="aspectFill" :src="item.icon"></image>
                  </div>
                  <div class="item-inner">
                    <p class="title">{{item.goods_name}}</p>
                    <p class="p1"></p>
                    <div style="position: relative;">
                      <p class="p3">
                        <span>¥ {{item.market_price}}</span>
                        ¥ {{item.shop_price}}
                      </p>
                      <div class="cart"></div>
                    </div>
                  </div>
                </a>
              </li>
            </ul>

          </div>

          </div>
        </div>
      </div>
      <!--tab-->
    </div>
  </div>
</template>

<script>
import {isLogin} from '@/utils/handleLogin'
  export default {
    data () {
      return {
        list: []
      }
    },
    methods: {
      async load(){
         this.$_util.ajax.post('https://guo-a.com/mapi/collect/getlist?token=' + this.$store.state.Token).then((res)=>{
          if(res.code === 200){
            this.list = res.data
          }
         })
      }
    },

    onShow(){
      isLogin(()=>{
        this.load()
      })
    },
    mounted () {
    }
  }
</script>
